<template>
  <view class="info-box">
    <u-text text="客户跟进" color="#000" bold></u-text>
    <u-textarea placeholder="请输入内容" v-model="content"
      customStyle="background:#F8F8F8;margin-top:20rpx;border-color:#f8f8f8 !important;border-radius:24rpx"></u-textarea>
    <view class="action-btn" @click="_custom_follow">确定添加</view>
  </view>
</template>

<script setup>
  import { ref } from 'vue';
  import { custom_follow } from '@/config/api.js'
  const props = defineProps({
    id: {
      type: String,
      default: ''
    }
  })
  const content = ref('')
  // 客户跟进
  const _custom_follow = () => {
    uni.$u.loading
    custom_follow({ content: content.value, custom_id: props.id }).then(res => {
      uni.$u.toast(res.msg)
      setTimeout(() => {
        uni.navigateBack()
      }, 500)
    })
  }
</script>

<style lang="scss" scoped>
  .info-box {
    margin: 20rpx;
    background: #fff;
    padding: 20rpx;
    border-radius: 20rpx;
  }

  .action-btn {
    background: #F87610;
    border-radius: 50rpx;
    text-align: center;
    line-height: 90rpx;
    font-size: 30rpx;
    color: #fff;
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    left: 30rpx;
    right: 30rpx;
  }
</style>